var mongoose=require("mongoose");
mongoose.Promise = global.Promise; 
var db=mongoose.createConnection("mongodb://wopelo:mongo@localhost:27017/testDB");
var userSchema=require("../schemas/user.js");
db.on("error",function(){
	console.log("douUser连接错误");
});
db.on("open",function(){
	console.log("douUser被打开");
});
var User=db.model("Movie",userSchema);

module.exports=User;